package com.wideplay.warp.remoting;

import com.google.inject.Binder;
import com.google.inject.name.Names;

/**
 * Created by IntelliJ IDEA.
 * User: dprasanna
 * Date: 1/10/2007
 * Time: 17:06:22
 * <p/>
 * TODO: Describe me!
 *
 * @author dprasanna
 * @since 1.0
 */
public class ServiceExporters {

    private ServiceExporters() {
    }

    public static <T> void export(Binder binder, RemoteBinding<T> binding, RemoteScopeDescriptor remoteScopeDescriptor) {
        binder.bind(RmiServiceDispatcher.class)
                .annotatedWith(Names.named(binding.getIface().getSimpleName()))
                .toInstance(new RmiServiceDispatcher());
    }
}
